<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
    <meta charset="UTF-8"/>
    <title>Thymeleaf in action</title>
</head>
<body>
<!--/*@thymesVar id="userModel" type="com.example.thymeleafdemo.controller.UserController" */-->

<div th:replace="~{fragments/header :: header}"></div>
<h3 th:text="${userModel.title}"></h3>
<div>
    <a href="/users/form.html" th:href="@{/users/form}">创建用户</a>
</div>
<table border="1">
    <thead>
    <tr>
        <td>ID</td>
        <td>EMAIL</td>
        <td>NAME</td>
    </tr>
    </thead>
    <tbody>
    <tr th:if="${userModel.userList.size()} eq 0">
        <td colspan="3">没有用户信息4</td>
    </tr>
    <tr th:each="user :${userModel.userList}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.email}"></td>
        <td><a th:href="@{'/users/'+${user.id}}" th:text="${user.name}">ddd</a></td>
    </tr>
    </tbody>
</table>

<div th:replace="fragments/footer :: footer"></div>

</body>
</html>